using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VVVFBRIEF
    {
        public DataRow Convert2VVFBRIEF(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryVVFBRIEF(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["VVFMANDANT"] = " ".PadRight(2 ); 
         dwReturn["VVFAVIS"] = " ".PadRight(8 ); 
         dwReturn["VVFFBR"] = " ".PadRight(4 ); 
         dwReturn["VVFNAME1"] = " ".PadRight(40 ); 
         dwReturn["VVFNAME2"] = " ".PadRight(40 ); 
         dwReturn["VVFSTRASSE"] = " ".PadRight(40 ); 
         dwReturn["VVFLAND"] = " ".PadRight(3 ); 
         dwReturn["VVFPLZ"] = " ".PadRight(12 ); 
         dwReturn["VVFORT"] = " ".PadRight(40 ); 
         dwReturn["VVFBZ"] = " ".PadRight(2 ); 
         dwReturn["VVFBZBEZ"] = " ".PadRight(13 ); 
         dwReturn["VVFCOUNTRY"] = " ".PadRight(4 ); 
         dwReturn["VVFCITY"] = " ".PadRight(4 ); 
         dwReturn["VVFZONE"] = " ".PadRight(4 ); 
         dwReturn["VVFANZ"] = " ".PadRight(0 ); 
         dwReturn["VVFTARA"] = " ".PadRight(0 ); 
         dwReturn["VVFBRUTTO"] = " ".PadRight(0 ); 
         dwReturn["VVFNETTO"] = " ".PadRight(0 ); 
         dwReturn["VVFVOLUMEN"] = " ".PadRight(0 ); 
         dwReturn["VVFANZSTK"] = " ".PadRight(0 ); 
         dwReturn["VVFLIEFBED"] = " ".PadRight(3 ); 
         dwReturn["VVFKZKOSTBER"] = " ".PadRight(1 ); 
         dwReturn["VVFVERSART"] = " ".PadRight(3 ); 
         dwReturn["VVFSPED"] = " ".PadRight(3 ); 
         dwReturn["VVFVERSARTU"] = " ".PadRight(3 ); 
         dwReturn["VVFSPEDU"] = " ".PadRight(3 ); 
         dwReturn["VVFVERSARTV"] = " ".PadRight(3 ); 
         dwReturn["VVFSPEDV"] = " ".PadRight(3 ); 
         dwReturn["VVFDRKZ"] = " ".PadRight(1 ); 
         dwReturn["VVFGTBZ"] = " ".PadRight(5 ); 
         dwReturn["VVFKM2"] = " ".PadRight(5 ); 
         dwReturn["VVFTARIF1"] = " ".PadRight(8 ); 
         dwReturn["VVFORTKL1"] = " ".PadRight(2 ); 
         dwReturn["VVFFRPFL1"] = " ".PadRight(0 ); 
         dwReturn["VVFLAKL1"] = " ".PadRight(0 ); 
         dwReturn["VVFFRSATZ1"] = " ".PadRight(0 ); 
         dwReturn["VVFFRERRECH1"] = " ".PadRight(0 ); 
         dwReturn["VVFMARGEP1"] = " ".PadRight(0 ); 
         dwReturn["VVFMARGEA1"] = " ".PadRight(0 ); 
         dwReturn["VVFSUMME1"] = " ".PadRight(0 ); 
         dwReturn["VVFTARIF2"] = " ".PadRight(8 ); 
         dwReturn["VVFORTKL2"] = " ".PadRight(2 ); 
         dwReturn["VVFFRPFL2"] = " ".PadRight(0 ); 
         dwReturn["VVFLAKL2"] = " ".PadRight(0 ); 
         dwReturn["VVFFRSATZ2"] = " ".PadRight(0 ); 
         dwReturn["VVFFRERRECH2"] = " ".PadRight(0 ); 
         dwReturn["VVFMARGEP2"] = " ".PadRight(0 ); 
         dwReturn["VVFMARGEA2"] = " ".PadRight(0 ); 
         dwReturn["VVFSUMME2"] = " ".PadRight(0 ); 
         dwReturn["VVFTARIF3"] = " ".PadRight(8 ); 
         dwReturn["VVFORTKL3"] = " ".PadRight(2 ); 
         dwReturn["VVFFRPFL3"] = " ".PadRight(0 ); 
         dwReturn["VVFLAKL3"] = " ".PadRight(0 ); 
         dwReturn["VVFFRSATZ3"] = " ".PadRight(0 ); 
         dwReturn["VVFFRERRECH3"] = " ".PadRight(0 ); 
         dwReturn["VVFMARGEP3"] = " ".PadRight(0 ); 
         dwReturn["VVFMARGEA3"] = " ".PadRight(0 ); 
         dwReturn["VVFSUMME3"] = " ".PadRight(0 ); 
         dwReturn["VVFPRAEMIEV"] = " ".PadRight(0 ); 
         dwReturn["VVFNEBENKO"] = " ".PadRight(0 ); 
         dwReturn["VVFWAEHRSLN"] = " ".PadRight(3 ); 
         dwReturn["VVFWAEHRSL"] = " ".PadRight(3 ); 
         dwReturn["VVFHWAEHRSL"] = " ".PadRight(3 ); 
         dwReturn["VVFHEUROKURS"] = " ".PadRight(0 ); 
         dwReturn["VVFHEUROKURSVK"] = " ".PadRight(1 ); 
         dwReturn["VVFFEUROKURS"] = " ".PadRight(0 ); 
         dwReturn["VVFFEUROKURSVK"] = " ".PadRight(1 ); 
         dwReturn["VVFKOSTBGR"] = " ".PadRight(0 ); 
         dwReturn["VVFLIEFNR"] = " ".PadRight(8 ); 
         dwReturn["VVFRENR"] = " ".PadRight(10 ); 
         dwReturn["VVFREPOS"] = " ".PadRight(4 ); 
         dwReturn["VVFREDAT"] = " ".PadRight(0 ); 
         dwReturn["VVFFRNETTO"] = " ".PadRight(0 ); 
         dwReturn["VVFFRKSTA"] = " ".PadRight(1 ); 
         dwReturn["VVFSTRANSDATA"] = " ".PadRight(0 ); 
         dwReturn["VVFSTRANSUHRA"] = " ".PadRight(0 ); 
         dwReturn["VVFSTRANSERL"] = " ".PadRight(1 ); 
         dwReturn["VVFSTRANSDATE"] = " ".PadRight(0 ); 
         dwReturn["VVFSTRANSUHRE"] = " ".PadRight(0 ); 
         dwReturn["VVFAKTKZ"] = " ".PadRight(1 ); 
         dwReturn["VVFPSTKKZ"] = " ".PadRight(1 ); 
         dwReturn["VVFFILLER"] = " ".PadRight(68 ); 
         dwReturn["VVFAENZL"] = " ".PadRight(0 ); 
         dwReturn["VVFAENB"] = " ".PadRight(8 ); 
         dwReturn["VVFAEND"] = " ".PadRight(0 ); 
         dwReturn["VVFNEUB"] = " ".PadRight(8 ); 
         dwReturn["VVFNEUD"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapVVFBRIEF(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveVVFBRIEF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryVVFBRIEF(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapVVFBRIEF(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertVVFBRIEF(dwLocal, ITXDBVERSION);
            }
            UpdateVVFBRIEF(dwLocal);
        }
        public void InsertVVFBRIEF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO VVFBRIEF(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryVVFBRIEF(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM VVFBRIEF WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM VVFBRIEF  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "VVFBRIEF";
            Return = Result;
            return Return;
        }
        public void DeleteVVFBRIEF(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM VVFBRIEF   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateVVFBRIEF(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE VVFBRIEF SET "
                    +"VVFMANDANT= :VVFMANDANT,"
                    +"VVFAVIS= :VVFAVIS,"
                    +"VVFFBR= :VVFFBR,"
                    +"VVFNAME1= :VVFNAME1,"
                    +"VVFNAME2= :VVFNAME2,"
                    +"VVFSTRASSE= :VVFSTRASSE,"
                    +"VVFLAND= :VVFLAND,"
                    +"VVFPLZ= :VVFPLZ,"
                    +"VVFORT= :VVFORT,"
                    +"VVFBZ= :VVFBZ,"
                    +"VVFBZBEZ= :VVFBZBEZ,"
                    +"VVFCOUNTRY= :VVFCOUNTRY,"
                    +"VVFCITY= :VVFCITY,"
                    +"VVFZONE= :VVFZONE,"
                    +"VVFANZ= :VVFANZ,"
                    +"VVFTARA= :VVFTARA,"
                    +"VVFBRUTTO= :VVFBRUTTO,"
                    +"VVFNETTO= :VVFNETTO,"
                    +"VVFVOLUMEN= :VVFVOLUMEN,"
                    +"VVFANZSTK= :VVFANZSTK,"
                    +"VVFLIEFBED= :VVFLIEFBED,"
                    +"VVFKZKOSTBER= :VVFKZKOSTBER,"
                    +"VVFVERSART= :VVFVERSART,"
                    +"VVFSPED= :VVFSPED,"
                    +"VVFVERSARTU= :VVFVERSARTU,"
                    +"VVFSPEDU= :VVFSPEDU,"
                    +"VVFVERSARTV= :VVFVERSARTV,"
                    +"VVFSPEDV= :VVFSPEDV,"
                    +"VVFDRKZ= :VVFDRKZ,"
                    +"VVFGTBZ= :VVFGTBZ,"
                    +"VVFKM2= :VVFKM2,"
                    +"VVFTARIF1= :VVFTARIF1,"
                    +"VVFORTKL1= :VVFORTKL1,"
                    +"VVFFRPFL1= :VVFFRPFL1,"
                    +"VVFLAKL1= :VVFLAKL1,"
                    +"VVFFRSATZ1= :VVFFRSATZ1,"
                    +"VVFFRERRECH1= :VVFFRERRECH1,"
                    +"VVFMARGEP1= :VVFMARGEP1,"
                    +"VVFMARGEA1= :VVFMARGEA1,"
                    +"VVFSUMME1= :VVFSUMME1,"
                    +"VVFTARIF2= :VVFTARIF2,"
                    +"VVFORTKL2= :VVFORTKL2,"
                    +"VVFFRPFL2= :VVFFRPFL2,"
                    +"VVFLAKL2= :VVFLAKL2,"
                    +"VVFFRSATZ2= :VVFFRSATZ2,"
                    +"VVFFRERRECH2= :VVFFRERRECH2,"
                    +"VVFMARGEP2= :VVFMARGEP2,"
                    +"VVFMARGEA2= :VVFMARGEA2,"
                    +"VVFSUMME2= :VVFSUMME2,"
                    +"VVFTARIF3= :VVFTARIF3,"
                    +"VVFORTKL3= :VVFORTKL3,"
                    +"VVFFRPFL3= :VVFFRPFL3,"
                    +"VVFLAKL3= :VVFLAKL3,"
                    +"VVFFRSATZ3= :VVFFRSATZ3,"
                    +"VVFFRERRECH3= :VVFFRERRECH3,"
                    +"VVFMARGEP3= :VVFMARGEP3,"
                    +"VVFMARGEA3= :VVFMARGEA3,"
                    +"VVFSUMME3= :VVFSUMME3,"
                    +"VVFPRAEMIEV= :VVFPRAEMIEV,"
                    +"VVFNEBENKO= :VVFNEBENKO,"
                    +"VVFWAEHRSLN= :VVFWAEHRSLN,"
                    +"VVFWAEHRSL= :VVFWAEHRSL,"
                    +"VVFHWAEHRSL= :VVFHWAEHRSL,"
                    +"VVFHEUROKURS= :VVFHEUROKURS,"
                    +"VVFHEUROKURSVK= :VVFHEUROKURSVK,"
                    +"VVFFEUROKURS= :VVFFEUROKURS,"
                    +"VVFFEUROKURSVK= :VVFFEUROKURSVK,"
                    +"VVFKOSTBGR= :VVFKOSTBGR,"
                    +"VVFLIEFNR= :VVFLIEFNR,"
                    +"VVFRENR= :VVFRENR,"
                    +"VVFREPOS= :VVFREPOS,"
                    +"VVFREDAT= :VVFREDAT,"
                    +"VVFFRNETTO= :VVFFRNETTO,"
                    +"VVFFRKSTA= :VVFFRKSTA,"
                    +"VVFSTRANSDATA= :VVFSTRANSDATA,"
                    +"VVFSTRANSUHRA= :VVFSTRANSUHRA,"
                    +"VVFSTRANSERL= :VVFSTRANSERL,"
                    +"VVFSTRANSDATE= :VVFSTRANSDATE,"
                    +"VVFSTRANSUHRE= :VVFSTRANSUHRE,"
                    +"VVFAKTKZ= :VVFAKTKZ,"
                    +"VVFPSTKKZ= :VVFPSTKKZ,"
                    +"VVFFILLER= :VVFFILLER,"
                    +"VVFAENZL= :VVFAENZL,"
                    +"VVFAENB= :VVFAENB,"
                    +"VVFAEND= :VVFAEND,"
                    +"VVFNEUB= :VVFNEUB,"
                    +"VVFNEUD= :VVFNEUD,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("VVFMANDANT", OracleType.NVarChar).Value = dwData["VVFMANDANT"].ToString(); 
          or1.Parameters.Add("VVFAVIS", OracleType.NVarChar).Value = dwData["VVFAVIS"].ToString(); 
          or1.Parameters.Add("VVFFBR", OracleType.NVarChar).Value = dwData["VVFFBR"].ToString(); 
          or1.Parameters.Add("VVFNAME1", OracleType.NVarChar).Value = dwData["VVFNAME1"].ToString(); 
          or1.Parameters.Add("VVFNAME2", OracleType.NVarChar).Value = dwData["VVFNAME2"].ToString(); 
          or1.Parameters.Add("VVFSTRASSE", OracleType.NVarChar).Value = dwData["VVFSTRASSE"].ToString(); 
          or1.Parameters.Add("VVFLAND", OracleType.NVarChar).Value = dwData["VVFLAND"].ToString(); 
          or1.Parameters.Add("VVFPLZ", OracleType.NVarChar).Value = dwData["VVFPLZ"].ToString(); 
          or1.Parameters.Add("VVFORT", OracleType.NVarChar).Value = dwData["VVFORT"].ToString(); 
          or1.Parameters.Add("VVFBZ", OracleType.NVarChar).Value = dwData["VVFBZ"].ToString(); 
          or1.Parameters.Add("VVFBZBEZ", OracleType.NVarChar).Value = dwData["VVFBZBEZ"].ToString(); 
          or1.Parameters.Add("VVFCOUNTRY", OracleType.NVarChar).Value = dwData["VVFCOUNTRY"].ToString(); 
          or1.Parameters.Add("VVFCITY", OracleType.NVarChar).Value = dwData["VVFCITY"].ToString(); 
          or1.Parameters.Add("VVFZONE", OracleType.NVarChar).Value = dwData["VVFZONE"].ToString(); 
          or1.Parameters.Add("VVFANZ", OracleType.NVarChar).Value = dwData["VVFANZ"].ToString(); 
          or1.Parameters.Add("VVFTARA", OracleType.NVarChar).Value = dwData["VVFTARA"].ToString(); 
          or1.Parameters.Add("VVFBRUTTO", OracleType.NVarChar).Value = dwData["VVFBRUTTO"].ToString(); 
          or1.Parameters.Add("VVFNETTO", OracleType.NVarChar).Value = dwData["VVFNETTO"].ToString(); 
          or1.Parameters.Add("VVFVOLUMEN", OracleType.NVarChar).Value = dwData["VVFVOLUMEN"].ToString(); 
          or1.Parameters.Add("VVFANZSTK", OracleType.NVarChar).Value = dwData["VVFANZSTK"].ToString(); 
          or1.Parameters.Add("VVFLIEFBED", OracleType.NVarChar).Value = dwData["VVFLIEFBED"].ToString(); 
          or1.Parameters.Add("VVFKZKOSTBER", OracleType.NVarChar).Value = dwData["VVFKZKOSTBER"].ToString(); 
          or1.Parameters.Add("VVFVERSART", OracleType.NVarChar).Value = dwData["VVFVERSART"].ToString(); 
          or1.Parameters.Add("VVFSPED", OracleType.NVarChar).Value = dwData["VVFSPED"].ToString(); 
          or1.Parameters.Add("VVFVERSARTU", OracleType.NVarChar).Value = dwData["VVFVERSARTU"].ToString(); 
          or1.Parameters.Add("VVFSPEDU", OracleType.NVarChar).Value = dwData["VVFSPEDU"].ToString(); 
          or1.Parameters.Add("VVFVERSARTV", OracleType.NVarChar).Value = dwData["VVFVERSARTV"].ToString(); 
          or1.Parameters.Add("VVFSPEDV", OracleType.NVarChar).Value = dwData["VVFSPEDV"].ToString(); 
          or1.Parameters.Add("VVFDRKZ", OracleType.NVarChar).Value = dwData["VVFDRKZ"].ToString(); 
          or1.Parameters.Add("VVFGTBZ", OracleType.NVarChar).Value = dwData["VVFGTBZ"].ToString(); 
          or1.Parameters.Add("VVFKM2", OracleType.NVarChar).Value = dwData["VVFKM2"].ToString(); 
          or1.Parameters.Add("VVFTARIF1", OracleType.NVarChar).Value = dwData["VVFTARIF1"].ToString(); 
          or1.Parameters.Add("VVFORTKL1", OracleType.NVarChar).Value = dwData["VVFORTKL1"].ToString(); 
          or1.Parameters.Add("VVFFRPFL1", OracleType.NVarChar).Value = dwData["VVFFRPFL1"].ToString(); 
          or1.Parameters.Add("VVFLAKL1", OracleType.NVarChar).Value = dwData["VVFLAKL1"].ToString(); 
          or1.Parameters.Add("VVFFRSATZ1", OracleType.NVarChar).Value = dwData["VVFFRSATZ1"].ToString(); 
          or1.Parameters.Add("VVFFRERRECH1", OracleType.NVarChar).Value = dwData["VVFFRERRECH1"].ToString(); 
          or1.Parameters.Add("VVFMARGEP1", OracleType.NVarChar).Value = dwData["VVFMARGEP1"].ToString(); 
          or1.Parameters.Add("VVFMARGEA1", OracleType.NVarChar).Value = dwData["VVFMARGEA1"].ToString(); 
          or1.Parameters.Add("VVFSUMME1", OracleType.NVarChar).Value = dwData["VVFSUMME1"].ToString(); 
          or1.Parameters.Add("VVFTARIF2", OracleType.NVarChar).Value = dwData["VVFTARIF2"].ToString(); 
          or1.Parameters.Add("VVFORTKL2", OracleType.NVarChar).Value = dwData["VVFORTKL2"].ToString(); 
          or1.Parameters.Add("VVFFRPFL2", OracleType.NVarChar).Value = dwData["VVFFRPFL2"].ToString(); 
          or1.Parameters.Add("VVFLAKL2", OracleType.NVarChar).Value = dwData["VVFLAKL2"].ToString(); 
          or1.Parameters.Add("VVFFRSATZ2", OracleType.NVarChar).Value = dwData["VVFFRSATZ2"].ToString(); 
          or1.Parameters.Add("VVFFRERRECH2", OracleType.NVarChar).Value = dwData["VVFFRERRECH2"].ToString(); 
          or1.Parameters.Add("VVFMARGEP2", OracleType.NVarChar).Value = dwData["VVFMARGEP2"].ToString(); 
          or1.Parameters.Add("VVFMARGEA2", OracleType.NVarChar).Value = dwData["VVFMARGEA2"].ToString(); 
          or1.Parameters.Add("VVFSUMME2", OracleType.NVarChar).Value = dwData["VVFSUMME2"].ToString(); 
          or1.Parameters.Add("VVFTARIF3", OracleType.NVarChar).Value = dwData["VVFTARIF3"].ToString(); 
          or1.Parameters.Add("VVFORTKL3", OracleType.NVarChar).Value = dwData["VVFORTKL3"].ToString(); 
          or1.Parameters.Add("VVFFRPFL3", OracleType.NVarChar).Value = dwData["VVFFRPFL3"].ToString(); 
          or1.Parameters.Add("VVFLAKL3", OracleType.NVarChar).Value = dwData["VVFLAKL3"].ToString(); 
          or1.Parameters.Add("VVFFRSATZ3", OracleType.NVarChar).Value = dwData["VVFFRSATZ3"].ToString(); 
          or1.Parameters.Add("VVFFRERRECH3", OracleType.NVarChar).Value = dwData["VVFFRERRECH3"].ToString(); 
          or1.Parameters.Add("VVFMARGEP3", OracleType.NVarChar).Value = dwData["VVFMARGEP3"].ToString(); 
          or1.Parameters.Add("VVFMARGEA3", OracleType.NVarChar).Value = dwData["VVFMARGEA3"].ToString(); 
          or1.Parameters.Add("VVFSUMME3", OracleType.NVarChar).Value = dwData["VVFSUMME3"].ToString(); 
          or1.Parameters.Add("VVFPRAEMIEV", OracleType.NVarChar).Value = dwData["VVFPRAEMIEV"].ToString(); 
          or1.Parameters.Add("VVFNEBENKO", OracleType.NVarChar).Value = dwData["VVFNEBENKO"].ToString(); 
          or1.Parameters.Add("VVFWAEHRSLN", OracleType.NVarChar).Value = dwData["VVFWAEHRSLN"].ToString(); 
          or1.Parameters.Add("VVFWAEHRSL", OracleType.NVarChar).Value = dwData["VVFWAEHRSL"].ToString(); 
          or1.Parameters.Add("VVFHWAEHRSL", OracleType.NVarChar).Value = dwData["VVFHWAEHRSL"].ToString(); 
          or1.Parameters.Add("VVFHEUROKURS", OracleType.NVarChar).Value = dwData["VVFHEUROKURS"].ToString(); 
          or1.Parameters.Add("VVFHEUROKURSVK", OracleType.NVarChar).Value = dwData["VVFHEUROKURSVK"].ToString(); 
          or1.Parameters.Add("VVFFEUROKURS", OracleType.NVarChar).Value = dwData["VVFFEUROKURS"].ToString(); 
          or1.Parameters.Add("VVFFEUROKURSVK", OracleType.NVarChar).Value = dwData["VVFFEUROKURSVK"].ToString(); 
          or1.Parameters.Add("VVFKOSTBGR", OracleType.NVarChar).Value = dwData["VVFKOSTBGR"].ToString(); 
          or1.Parameters.Add("VVFLIEFNR", OracleType.NVarChar).Value = dwData["VVFLIEFNR"].ToString(); 
          or1.Parameters.Add("VVFRENR", OracleType.NVarChar).Value = dwData["VVFRENR"].ToString(); 
          or1.Parameters.Add("VVFREPOS", OracleType.NVarChar).Value = dwData["VVFREPOS"].ToString(); 
          or1.Parameters.Add("VVFREDAT", OracleType.NVarChar).Value = dwData["VVFREDAT"].ToString(); 
          or1.Parameters.Add("VVFFRNETTO", OracleType.NVarChar).Value = dwData["VVFFRNETTO"].ToString(); 
          or1.Parameters.Add("VVFFRKSTA", OracleType.NVarChar).Value = dwData["VVFFRKSTA"].ToString(); 
          or1.Parameters.Add("VVFSTRANSDATA", OracleType.NVarChar).Value = dwData["VVFSTRANSDATA"].ToString(); 
          or1.Parameters.Add("VVFSTRANSUHRA", OracleType.NVarChar).Value = dwData["VVFSTRANSUHRA"].ToString(); 
          or1.Parameters.Add("VVFSTRANSERL", OracleType.NVarChar).Value = dwData["VVFSTRANSERL"].ToString(); 
          or1.Parameters.Add("VVFSTRANSDATE", OracleType.NVarChar).Value = dwData["VVFSTRANSDATE"].ToString(); 
          or1.Parameters.Add("VVFSTRANSUHRE", OracleType.NVarChar).Value = dwData["VVFSTRANSUHRE"].ToString(); 
          or1.Parameters.Add("VVFAKTKZ", OracleType.NVarChar).Value = dwData["VVFAKTKZ"].ToString(); 
          or1.Parameters.Add("VVFPSTKKZ", OracleType.NVarChar).Value = dwData["VVFPSTKKZ"].ToString(); 
          or1.Parameters.Add("VVFFILLER", OracleType.NVarChar).Value = dwData["VVFFILLER"].ToString(); 
          or1.Parameters.Add("VVFAENZL", OracleType.NVarChar).Value = dwData["VVFAENZL"].ToString(); 
          or1.Parameters.Add("VVFAENB", OracleType.NVarChar).Value = dwData["VVFAENB"].ToString(); 
          or1.Parameters.Add("VVFAEND", OracleType.NVarChar).Value = dwData["VVFAEND"].ToString(); 
          or1.Parameters.Add("VVFNEUB", OracleType.NVarChar).Value = dwData["VVFNEUB"].ToString(); 
          or1.Parameters.Add("VVFNEUD", OracleType.NVarChar).Value = dwData["VVFNEUD"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
